package service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import dao.IItemDao;
import dao.entity.Item;

@Service
public class ItemService {
	private IItemDao itemDao;

	@Autowired
	public void setItemDao(IItemDao itemDao) {
		this.itemDao = itemDao;
	}

	public Item get(long id) {
		return itemDao.get(id);
	}

	public void createOrUpdate(Item item) {
		itemDao.saveOrUpdate(item);
	}

	public List<Item> getAll() {
		return itemDao.getAll();
	}

}
